$(function(){
	selectAlls();
});

var currentPagess=1;
var ss=0;
function selectAlls() {
	if(currentPagess==1 || currentPagess==2 || ss!=0){
 	$.ajax({ 		/*urlcore + ,*/
 		url: urlcore+"/api/message/selectMessageList2?current="+currentPagess+"&type=2",
 		type: "get",
 		dataType: 'json',
 		contentType: "application/json;charset=utf-8",
 		success: function(data) {
 			if(data.success == true) {
 			 ss=data.data.records.length;
 	      			 $.each(data.data.records, function(y,n) {
    var xitong='<div class="a_box mid-width">'+
    '<div>'+
         '<h3>'+n.title+'</h3>'+
         '<span>'+n.gmtDatetime+'</span>'+
         '<p class="a_third">'+n.content+'</p>'+
    '</div>'+
    '<div class="a_second clearfix">'+
         '<a href="2.0.7xitongxiaoxi_detail.html?id='+n.id+'">立即查看</a>'+
    '</div>'+
 '</div>';
            $("#xitong").append(xitong);
 	      			 });
 				 
 			
 			}else{
 				alert(data.msg);
 			}
       
    
 		},
 		error: function() {
 			/* Act on the event */
 			alert("error");
 		}
 	});
 }
 }
